package bookstore.manager;

import bookstore.bound.book.BookCreateForm;
import bookstore.bound.book.BookReviewForm;
import bookstore.bound.book.BookReviewRespForm;
import bookstore.model.Book;
import bookstore.model.BookReview;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.Part;
import java.util.ArrayList;
import java.util.Map;
import java.util.Optional;

public interface BookManager {
    // Create
    Map addNewBook(BookCreateForm bookCreateForm);

    Map setBookSurface(ServletContext ctx, String isbn, Part filepart);

    // Retrieve
    Map getBookDetail(String isbn);

    ArrayList getAllBooks();

    BookReview getBookReview(String isbn);

    // Update
    Map updateAuthor(String isbn, String author);

    Map updateHouse(String isbn, String house);

    Map updateStock(String isbn, int stock);

    Map updateSellPrice(String isbn, int price);

    Map AddReview(String isbn, HttpSession session, BookReviewForm bookReviewForm);

    Map AddReviewResp(String isbn, HttpSession session, int reviewid, BookReviewRespForm bookReviewRespForm);

    // Delete
    Map delete(String isbn);
}
